package com.by.api.fiegn;

import com.by.api.dto.LockStock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/18 17:34
 * @since JDK1.8
 */
@FeignClient("sc-product")
public interface ProductFeignClient {

    /**
     * 锁定库存
     * @param lockStocks
     * @return
     */
    @PutMapping("/feign/lockStock")
    int saveStock(@RequestBody List<LockStock> lockStocks);
}
